package com.rinlink.jbcodec;

import java.util.HashMap;
import java.util.Map;

public class AbstractTransformCreatorMap<T extends TransformCreator> implements TransformCreatorMap<T> {

    private Map<String,T> innerMap;

    public AbstractTransformCreatorMap() {
        this.innerMap = new HashMap<>();
    }

    @Override
    public T get(String name) {
        return innerMap.get(name.toLowerCase());
    }

    @Override
    public T add(String name, T t) {
        return innerMap.put(name.toLowerCase(),t);
    }
}
